#!bin/bash

p1=`which java`
p2=`which javac`
if [ -f "$p1" ]; then
	sudo apt update
else
	sudo apt install default-jre
if
if [ -f "$p2" ]; then
	sudo apt update
else 
	sudo apt install default-jdk
fi
cd ~
sed -i '$iJAVA_HOME=\"/usr/lib/jvm/java-11-openjdk-amd64/bin/java\"' .profile
sed -i '$export PATH=\"$JAVA_HOME/bin:$PATH\"'
source .profile 
